<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="businessObject.*,dataTransferObject.*,java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>Pet Society</title>
	<link rel="stylesheet" type="text/css" href="css/login.css" />
</head>

<body>
<div id="wrapper">

<div id="header">
	<a href="index.jsp" id="logo"><img src="images/logo.gif" width="310" height="114" alt="" title="" /></a>
 	<ul class="navigation"></ul>
</div>


<div id="rightcolumn">
	<form id="loginForm" action=FrontController?resource=muro.jsp method="post" name="loginForm">
		<fieldset id="body">
			<fieldset>
				<label for="user">Email</label>
				<input type="text" name="user" id="user" tabindex="1" value=""></input>
			</fieldset>
			<fieldset>
				<label for="pass">Password</label>
				<input type="password" name="pass" id="pass" tabindex="2"></input>
			</fieldset>
			<fieldset>
				<label for="rol">Rol</label>
				<select name="rol" size="1">
				<%
				List<Rol> roles = GestionUsuario.getInstance().getRoles();
				Rol rol;
				Iterator<Rol> itRoles = roles.iterator();
				
				while (itRoles.hasNext()) {
					rol = itRoles.next();
				%>
				<option value="<%=rol.getIdRol()%>"> <%=rol.getNombre()%> </option>
				<%
				}
				%>
				</select>
			</fieldset>
			<input type="submit" id="login" value="Iniciar sesion" tabindex="4" title="Enviar datos"></input>
		</fieldset>
		<%
		
		request.getSession().invalidate();
		
		String usuario=request.getParameter("usuario");
		if(usuario!=null){
			if(usuario.equals("no")){
			%>
				<p><font color="#800000">El usuario no es correcto</font></p>
			<%}
		}
			%>
		</form>
	
</div>



<div id="footer">
	<br></br>- Universidad de Sevilla -
</div>

</div>
</body>
</html>